import { 
  GET_SIGN_STATUS_ENUM_SUCCESS, 
  GET_TEMPLATE_STATUS_ENUM_SUCCESS,
  GET_INDUSTRY_ENUM_SUCCESS,
  GET_SCENARIOS_ENUM_SUCCESS,
  GET_OPERATOR_ENUM_SUCCESS,
  GET_MESSAGE_STATUS_ENUM_SUCCESS,
  GET_USER_RECHARGE_TYPE_ENUM_SUCCESS,
  GET_AUDIT_BATCH_STATUS_ENUM_SUCCESS
} from '@/actions/enum'

const initState = {
  signStatusEnum: [],
  templateStatusEnum: [],
  industryEnum: [],
  scenariosEnum: [],
  operatorEnum:[],
  messageStatusEnum:[],
  rechargeTypeEnum: [],
  auditBatchStatusEnum: [],
}

export default function enumReducer(state = initState, action) {
  switch (action.type) {
    case GET_SIGN_STATUS_ENUM_SUCCESS:
      return { ...state, signStatusEnum: action.signStatusEnum }
      break;

    case GET_TEMPLATE_STATUS_ENUM_SUCCESS:
      return { ...state, templateStatusEnum: action.templateStatusEnum }
      break;

    case GET_INDUSTRY_ENUM_SUCCESS:
      return { ...state, industryEnum: action.industryEnum }
      break;

    case GET_SCENARIOS_ENUM_SUCCESS:
      return { ...state, scenariosEnum: action.scenariosEnum }
      break;

    case GET_OPERATOR_ENUM_SUCCESS:
      return { ...state, operatorEnum: action.operatorEnum }
      break;

    case GET_MESSAGE_STATUS_ENUM_SUCCESS:
      return { ...state, messageStatusEnum: action.messageStatusEnum }
      break;

    case GET_USER_RECHARGE_TYPE_ENUM_SUCCESS:
      return { ...state, rechargeTypeEnum: action.rechargeTypeEnum }
      break;

    case GET_AUDIT_BATCH_STATUS_ENUM_SUCCESS:
      return { ...state, auditBatchStatusEnum: action.auditBatchStatusEnum }
      break;

    default:
      return state
      break;
  }
}

